package com.jasonchoi.security.controller;

import com.jasonchoi.security.entity.User;
import com.jasonchoi.security.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: JasonChoi
 * @Date: 2020/1/3 11:08
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping("/info")
    public String userInfo(){
        User user = userService.userInfo();
        return user.toString();
    }

    @RequestMapping("/login")
    public String login(){
        return "login";
    }
}
